const TransformPages = require('uni-read-pages')
const tfPages = new TransformPages({
	includes: ['path', 'name', 'aliasPath', 'meta']
})
module.exports = {
	configureWebpack: {
		plugins: [
			new tfPages.webpack.DefinePlugin({
				ROUTES: JSON.stringify(tfPages.routes)
			})
		]
	},
	devServer: {
		open: true,
		proxy: {
			'/api': {
				target: `http://172.16.20.168`,
				changeOrigin: true,
				logLevel: 'debug',
				pathRewrite: {
					['^' + '/api']: '/api'
				}
			}
		},
		disableHostCheck: true,
	}
}
